{% extends 'base.html' %}
{% block title %}{{ post.title }} - {{ config.title }} {% endblock %}

{% block content %}
<div class="mid-col">
    <div class="mid-col-container">
        <div id="content" class="inner">
            <article class="post" id="posts">
                <h1 class="title">{{ post.title }}</h1>

                <div class="time">
                    <span class="date">{{ post.date | date('Y-m-d') }}</span>
                </div>


                <div class="entry-content">
                    <div class="p_part">

{% if post.toc %}
<div class="toc"></div>  
{% endif %}  

{{ post.html|raw }}
                    </div>
                </div>
				</br>
                <div class="category">
                    {% if post.tags %}
                        <div class="tags">
                            {{ lang('tags') }}：
                            {% for tag in post.tags %}
                                <a href="/tags/{{ tag }}">{{ tag }}</a>
                            {% endfor %}
                        </div>
						</br>
                    {% endif %}
                </div>
            </article>
        </div>
    {% include 'include/comments.html' %}
    </div>
    {% include 'include/footer.html' %}
</div>
{% if post.toc %}
<script type="text/javascript" src="/templates/rock/js/toc.min.js"></script>      
<script>
  $('.toc').toc({
    'container': '.entry-content',
    'anchorName': function(i, heading, prefix) { //custom function for anchor name
         return prefix+i;
     }    
  });
</script>
{% endif %}  

{% endblock %}
